<div class="container"> 
	<div class="row"> 
		<div class="panel panel-info">
			<div class="panel-heading">
				<div class="panel-title">My Watchlist</div>
			</div>
			<div class="panel-body">
				
				<div class="row">
					<div class="col-md-12">
						<div class="well">
							<h1 class="text-center">Manage My Watchlist</h1>
							<div class="row">
								
								<div class="col-md-12">
									<table class="table table-condensed">
                                        <thead>
                                            <tr class="success">
												<th>Domain/TLD</th>
												<th>Phase</th>
												<th>Action</th>
												
                                            </tr>
                                        </thead>
                                        <tbody>
											<?php foreach($all_watchlist as $tld){?>
											<tr>
												<td><strong><?='.'.$tld['domain_name']?></strong></td>
												<td>General Availability</td>
												
												<td><a class=" btn btn-xs btn-warning" href="javascript:void(0)" >Buy Now</a></td>
											</tr>
											<?}?>
                                        </tbody>
									</table>
									
									
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>

function addwatchlist(tld)
{
	
	$.ajax({
		url: '<?php echo base_url('enom/addwatchlist');?>',
		type: 'post',
		data: 'tld=' + tld ,
		dataType:'json',
		
		beforeSend: function() {
			$('#processing-modal').modal('show');
		},		
		complete: function() {
			//$(e).children('.blue').css('background','#F9B014');
			//$(e).children('.blue').children('span').text('checkout');
		},
		success: function(json) {
			if(json['message'])
			{
				$('#ajax_msg').html('<div class="alert alert-success alert-dismissable flashmsg"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'+ json['message'] + '</div>');
				$('#ajax_msg .flashmsg').delay(5000).fadeOut('slow');
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
				$('#processing-modal').modal('hide');
				if(json['message']=="Login Required")
				{
					location=json['login_url'];
				}
				
			}
			
		}
	});
}
</script>